package com.fzz.learnitservice.pojo.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

/**
 * JSON单词数据结构DTO
 */
@Data
public class WordDataDTO {
    
    @JsonProperty("word")
    private String word;
    
    @JsonProperty("us")
    private String us;
    
    @JsonProperty("uk")
    private String uk;
    
    @JsonProperty("translations")
    private List<TranslationDTO> translations;
    
    @JsonProperty("phrases")
    private List<PhraseDTO> phrases;
    
    @JsonProperty("sentences")
    private List<SentenceDTO> sentences;
    
    @Data
    public static class TranslationDTO {
        @JsonProperty("translation")
        private String translation;
        
        @JsonProperty("type")
        private String type;
    }
    
    @Data
    public static class PhraseDTO {
        @JsonProperty("phrase")
        private String phrase;
        
        @JsonProperty("translation")
        private String translation;
    }
    
    @Data
    public static class SentenceDTO {
        @JsonProperty("sentence")
        private String sentence;
        
        @JsonProperty("translation")
        private String translation;
    }
}

